package com.shuzijun.leetcode.editor.cn;
public class MissingNumberLcci{
    public static void main(String[] args) {
         Solution solution = new MissingNumberLcci().new Solution();
    }
    //leetcode submit region begin(Prohibit modification and deletion)
class Solution {
    public int missingNumber(int[] nums) {
        int n = nums.length;
        int ret = 0;
        for (int i = 0; i <= n; i++) {
            ret ^= i;
        }
        for (int i = 0; i < n; i++) {
            ret ^= nums[i];
        }
        return ret;
    }
}
//leetcode submit region end(Prohibit modification and deletion)

}